package my.avoskagae.model.entity;

import java.util.Collection;
import java.util.Iterator;


public interface PurchasePlan {

	
	public enum State {PLANNING, PURCHASING, CONFIRMING, FINISHED}

	/**
	 * @return  Returns the purchases.
	 * @uml.property  name="purchases"
	 * @uml.associationEnd  multiplicity="(0 -1)" inverse="purchasePlan:my.avoska.shared.model.Purchase"
	 */
	public Collection<Purchase> getPurchases();

	/**
	 * Returns an iterator over the elements in this collection. 
	 * @return  an <tt>Iterator</tt> over the elements in this collection
	 * @see java.util.Collection#iterator()
	 * @uml.property  name="purchases"
	 */
	public Iterator<Purchase> purchasesIterator();

	/**
	 * Returns <tt>true</tt> if this collection contains no elements.
	 * @return  <tt>true</tt> if this collection contains no elements
	 * @see java.util.Collection#isEmpty()
	 * @uml.property  name="purchases"
	 */
//	public boolean isPurchasesEmpty();

	/**
	 * Returns <tt>true</tt> if this collection contains the specified element. 
	 * @param element  whose presence in this collection is to be tested.
	 * @see java.util.Collection#contains(Object)
	 * @uml.property  name="purchases"
	 */
//	public boolean containsPurchases(Purchase purchase);

	/**
	 * Returns <tt>true</tt> if this collection contains all of the elements in the specified collection.
	 * @param elements  collection to be checked for containment in this collection.
	 * @see java.util.Collection#containsAll(Collection)
	 * @uml.property  name="purchases"
	 */
//	public boolean containsAllPurchases(Collection<? extends Purchase> purchases);

	/**
	 * Returns the number of elements in this collection.
	 * @return  the number of elements in this collection
	 * @see java.util.Collection#size()
	 * @uml.property  name="purchases"
	 */
//	public int purchasesSize();

	/**
	 * Returns all elements of this collection in an array.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray()
	 * @uml.property  name="purchases"
	 */
//	public Purchase[] purchasesToArray();

	/**
	 * Returns an array containing all of the elements in this collection;  the runtime type of the returned array is that of the specified array.
	 * @param a  the array into which the elements of this collection are to be stored.
	 * @return  an array containing all of the elements in this collection
	 * @see java.util.Collection#toArray(Object[])
	 * @uml.property  name="purchases"
	 */
//	public <T extends Purchase> T[] purchasesToArray(T[] purchases);

	/**
	 * Ensures that this collection contains the specified element (optional operation). 
	 * @param element  whose presence in this collection is to be ensured.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="purchases"
	 */
	public boolean addPurchase(Purchase purchase);

	/**
	 * Setter of the property <tt>purchases</tt>
	 * @param purchases  the purchases to set.
	 * @uml.property  name="purchases"
	 */
//	public void setPurchases(Collection<Purchase> purchases);

	/**
	 * Removes a single instance of the specified element from this collection, if it is present (optional operation).
	 * @param element  to be removed from this collection, if present.
	 * @see java.util.Collection#add(Object)
	 * @uml.property  name="purchases"
	 */
	public boolean removePurchase(Purchase purchase);

	/**
	 * Removes all of the elements from this collection (optional operation).
	 * @see java.util.Collection#clear()
	 * @uml.property  name="purchases"
	 */
	public void clearPurchases();

	/**
	 * @return  Returns the name.
	 * @uml.property  name="name"
	 */
	public String getName();

	/**
	 * Setter of the property <tt>name</tt>
	 * @param name  The name to set.
	 * @uml.property  name="name"
	 */
	public void setName(String name);

	/**
	 * @return  Returns the state.
	 * @uml.property  name="state"
	 */
	public State getState();

	/**
	 * Setter of the property <tt>state</tt>
	 * @param state  The state to set.
	 * @uml.property  name="state"
	 */
	public void setState(State state);

}
